package com.yjd.bi.report.model;

import java.util.ArrayList;
import java.util.List;

import com.yjd.comm.base.model.Model;
import com.yjd.comm.util.StringUtil;

public class EChartsModel extends Model{
	 private List<String> legend;
	 private List<String> xAxis;
	 private List<Series> series;
	 
	public List<String> getLegend() {
		return legend;
	}
	/**
	 * 数据别名（图例）
	 * @param legend
	 */
	public void setLegend(List<String> legend) {
		this.legend = legend;
	}
	public List<String> getXAxis() {
		return xAxis;
	}
	/**
	 * x轴显示的列名
	 * @param xAxis
	 */
	public void setxAxis(List<String> xAxis) {
		this.xAxis = xAxis;
	}
	public List<Series> getSeries() {
		return series;
	}
	public void setSeries(List<Series> series) {
		this.series = series;
	}
	public void addSeries(List<String> data,String name) {
		if(this.series==null){
			this.series=new ArrayList<Series>();
		}
		Series s=new Series();
		s.setData(data);
		s.setName(name);
		this.series.add(s);
	}
	public void clear(){
		this.series=new ArrayList<Series>();
	}
}
